Along with the rapid development of the network communication, multimedia information transmitted by the packet technique has already come true. The trend of combining the traditional communication technique and the packet technique is becoming more and more obvious. Because of the difference in the coding modes of the media stream transmitted in the communication networks of the traditional communication technique and that of the modern packet technique, a device called gateway is needed at the interface of the traditional network and the packet network to switch the media stream coding mode.
At present, the media stream processed by the gateway mainly includes voice stream, data stream and video stream, wherein the data stream mainly includes the signals generated in the interaction between the data devices such as modems, accessing servers, common fax machines and high speed fax machines. The existing modes used in the industry to transmit the data streams via a gateway mainly include: Voice-Band Data (VBD) mode and T.38 mode.
The VBD mode treats the data stream as a common voice stream and conducts the coding/decoding in the mode which passes voice-band modulated signals with minimal distortion. The recommendation of coding and decoding are G.711 and G.726 prescribed by International Telecommunications Union—Telecommunication Standardization Sector (ITU-T). The advantage of the mode is that it is simple to realize and there is no need to know the signification of the specific data signals.
The T.38 mode is a transmitting mode by which the facsimile messages following the ITU-T Recommendation T.30 sent by the fax machines are transformed to messages in line with ITU-T Recommendation T.38, which is suitable for IP bearer network transmission. To ensure the quality of facsimile services, gateway manufacturers are trying their best to ensure that the mode is adopted in the processes of the facsimile services.
The above two modes to transmit the data streams usually co-exist in the network, which leads to a problem of working mode switching of the media stream transition channel (Channel in short) on the gateway. The working mode switching is the switching between the working modes of the voice stream coding/decoding transition channel and the data stream transition channel according to the need of the service, and the working mode switching of the data stream transition further includes the switching between the VBD mode and the T.38 mode. The condition to trigger the switching of channel state is the detection on the channel of various special data signal sent by the data devices by the gateway. The specific principle of the switching is to try the best to switch to the T.38 mode in the processes of facsimile service, and switch to the VBD mode in the processes of non-facsimile services, for example, a data service from the modem.
It can be seen from the description above that it is very important to the successful implementation of the data services that the gateway detects the signals sent by the various data devices as soon as possible, distinguishes the signals of facsimile devices from the signals of non-facsimile devices, and switches to different data stream transmitting modes.
A typical gateway is now capable of detecting its transmitted data signals which include: a Calling Tone (CNG) which is an indication signal sent by the transmitting fax machine; a Called Terminal Identification (CED), which is an indication signal sent by the receiving fax machine; a V.21 flag which is an High Data Link Control (HDLC) frame synchronous signal for 1 s±15% following the ITU-T Recommendation V.21 and an amplitude-modulated answer tone (ANSam), or an amplitude-modulated answer tone with phase reversals (/ANSam)sent by the modems. It can be seen that, as long as the signals are detected exactly, it is not difficult to distinguish a common fax machine and a modem. However, along with the development of data equipment, the high speed fax machines operating at a modem speed of 33.6 kbps have emerged in the market. The negotiation process of the high speed fax machines may include sending ANSam or /ANSam signals which are similar with that from the modems such that distinguishing the high speed fax machines from the modems and then switching the gateway to the corresponding data stream transmission mode quickly has become a problem concerned by many manufacturers.
In view of the problem mentioned above, a mode at present is to decide whether a signal comes from the modem or not by analyzing the accessing number of the user. If the prefix of the user's accessing number is consistent with that preset by the gateway, the signal is considered to be from the modem, so the gateway sets up a data transmission channel directly and works in the VBD mode; otherwise, the signal is affirmed to be not from a modem, if an ANSam or /ANSam signal is detected after the voice channel is set up, the signal will be considered to be from a high speed fax machine and the gateway will switch the channel to a data channel of the T.38 mode.
Another mode at present is that the VBD mode is used by both of the high speed fax machines and the modems. That is to say, after the ANSam or /ANSam signal is detected, the channel will be switched to the VBD mode while the transmission of the signals from the high speed fax machines in the T.38 mode is abandoned.